# list1=[1,3,4,5,8,5,8,6,1,5,8,9,99]
# list2=sorted(set(list1),key=lambda x:list1.count(x),reverse=True)
#
# for item in list2:
#     print(item,'出现的%d次'% list1.count(item))


# a=111
# b=a**3
# print(b)


# area_data = [
#     {"id": 1, "name": "中国", "parent_id": 0},
#     {"id": 2, "name": "北京市", "parent_id": 1},
#     {"id": 3, "name": "河北省", "parent_id": 1},
#     {"id": 4, "name": "四川省", "parent_id": 1},
#     {"id": 5, "name": "石家庄市", "parent_id": 3},
#     {"id": 6, "name": "唐山市", "parent_id": 3},
#     {"id": 7, "name": "邢台市", "parent_id": 3},
#     {"id": 8, "name": "成都市", "parent_id": 4},
#     {"id": 9, "name": "简阳市", "parent_id": 4},
#     {"id": 10, "name": "武侯区", "parent_id": 8},
#     {"id": 11, "name": "金牛区", "parent_id": 8},
#     {"id": 12, "name": "高新区", "parent_id": 8},
# ]
#
#
#
# def flatten_area_data(area_data):
#     result = []
#     for item in area_data:
#         result.append(item)
#         if "children" in item:
#             result.extend(flatten_area_data(item["children"]))
#             item.pop("children")
#     return result
# print(flatten_area_data(area_data))





